package com.abc.mapper;

import com.abc.entity.Kecheng;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface KechengMapper {

    //新增课程
    @Insert("insert into kecheng(mingcheng) values(#{mingcheng})")
    int insertKecheng(Kecheng kecheng);
    //根据 mingcheng 查询单条记录
    @Select("select * from kecheng where mingcheng=#{mingcheng}")
    Kecheng findByKechengMingcheng(String mingcheng);
    //查询所有的记录
    @Select("select * from kecheng")
    List<Kecheng> findAllKecheng();

}
